package 数学问题;

import java.math.BigInteger;
import java.util.Scanner;

public class 进制自由转换 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        System.out.println(nzhuanshi(a));

    }
    // 十转n
    static String shizhuann(int a){
        String b =Integer.toString(a,16);
        return b;
    }

    // n转十
    static BigInteger nzhuanshi(String a){
        BigInteger b = new BigInteger(a,16);
        return b;
    }


}
